const TOKENKEY = 'token'

//保存 token
const saveToken = token => {
        window.localStorage.setItem(TOKENKEY, JSON.stringify(token))
    }
    // 删除  token
const delToken = () => {
    window.localStorage.removeItem(TOKENKEY)
}

// 获取 token
const getToken = () => {
    return window.localStorage.getItem('token')
}

export { saveToken, delToken, getToken }